{{ $theme := .Site.Params.theme.default | default "auto" }}
{{ if not (in (slice .Site.Params.theme.option) $theme) }}
    {{ $theme = "auto" }}
{{ end }}
{{ return $theme }}